﻿@model FamilyJobsUI.Models.UsersEditModel

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>T_Users</h4>
        <hr />

        <table>
            <tr>
                <td>
                    @Html.Gravatar(Model.user_Email, 240, new { Title = "My Gravatar", Alt = "Gravatar" })
                </td>
                <td>
                    <div class=" ">
                        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                        @Html.HiddenFor(model => model.user_ID)

                        <div class="form-group">
                            @Html.LabelFor(model => model.user_Name, htmlAttributes: new { @class = "control-label col-md-2" })
                            <div class="col-md-10">
                                @Html.EditorFor(model => model.user_Name, new { htmlAttributes = new { @class = "form-control" } })
                                @Html.ValidationMessageFor(model => model.user_Name, "", new { @class = "text-danger" })
                            </div>
                        </div>

                        <div class="form-group">
                            @Html.LabelFor(model => model.user_Admin, htmlAttributes: new { @class = "control-label col-md-2" })
                            <div class="col-md-10">
                                <div class="checkbox">
                                    @Html.EditorFor(model => model.user_Admin)
                                    @Html.ValidationMessageFor(model => model.user_Admin, "", new { @class = "text-danger" })
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            @Html.LabelFor(model => model.user_Email, htmlAttributes: new { @class = "control-label col-md-2" })
                            <div class="col-md-10">

                                @Html.EditorFor(model => model.user_Email, new { htmlAttributes = new { @class = "form-control" } })

                                @Html.ValidationMessageFor(model => model.user_Email, "", new { @class = "text-danger" })
                            </div>
                        </div>

                        <div class="form-group">
                            @Html.LabelFor(model => model.user_Birthday, htmlAttributes: new { @class = "control-label col-md-2" })
                            <div class="col-md-10">
                                <div class="input-group ">
                                    <span class="input-group-addon">
                                        <span class="glyphicon glyphicon-calendar"</span>
                                        @Html.EditorFor(model => model.user_Birthday, new { htmlAttributes = new { @class = "form-control" } })
                                </div>
                                @Html.ValidationMessageFor(model => model.user_Birthday, "", new { @class = "text-danger" })
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-md-offset-2 col-md-10">
                                <input type="submit" value="Save" class="btn btn-default" />
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        </div>
        }

        <div>
            @Html.ActionLink("Back to List", "Index")
        </div>

        @section Scripts {
            @Scripts.Render("~/bundles/jqueryval")
            <script src="@Url.Content("~/Scripts/EditorHookup.js")" type="text/javascript"></script>
            <script src="@Url.Content("~/Scripts/RangeDateValidator.js")" type="text/javascript"></script>


        }
